<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInLeft">
        <div data-th-replace="common/functionDepict"></div>
        <div>
            <div class="row">
                <div class="creat-step-wrap clearfix">
                    <div id="abc1" class="col-sm-6 creat-step-current">
                        <div class="creat-step-bx">
                            <span class="vam fs24 c-4e"><i class="fa fa-hand-pointer-o"></i></span>
                            <div class="creat-step-txt">
                                <h5><span class="fs18 c-222">第一步：基本信息</span></h5>
                                <span class="fs14 c-999">免费直播管理的基本信息</span>
                            </div>
                        </div>
                    </div>
                    <div id="abc2" class="col-sm-6 secondStep">
                        <div class="creat-step-bx">
                            <span class="vam fs24 c-4e"><i class="fa fa-hand-peace-o"></i></span>
                            <div class="creat-step-txt">
                                <h5><span class="fs18 c-222">第二步：描述信息</span></h5>
                                <span class="fs14 c-999">免费直播管理的描述信息</span>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- 第一步开始 -->
                <div class="pt10">
                    <div class="col-sm-9">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>填写基本信息</h5>
                            </div>
                            <div class="ibox-content clearfix pt10">
                                <form class="form-horizontal m-t" id="courseOpen-form">
                                    <div class="form-horizontal">
                                        <input name="id" th:value="${courseOpen['id']}" type="hidden" id="id"/>
                                        <input name="imageJson" th:value="${courseOpen['imageJson']}" type="hidden"/>
                                        <input name="replay" th:value="${#strings.isEmpty(courseOpen['replay'])}?'1':${courseOpen['replay']}" type="hidden"/>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 免费直播名称</label>
                                            <div class="col-sm-8">
                                                <input class="validate-data form-control" type="text" id="title" name="courseName" th:value="${courseOpen['courseName']}"/>
                                                <span class="help-block m-b-none c-999"> 免费直播名称 限30个字符以内</span>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <input type="hidden" name="subjectIds" id="subjectIds" th:value="${courseOpen['subjectIds']}"/>
                                            <label class="col-sm-2 control-label"><i class="c-red">*</i> 选择专业</label>
                                            <div class="col-sm-8">
                                                <div id="course-open-subject-box"></div>
                                                <div id="course-open-subject-context"></div>
                                                <span class="help-block m-b-none c-999">选择所属专业或去新建</span>
                                            </div>
                                            <div class="col-sm-2 mt10">
                                                <a href="javascript:void(0)" onclick="getRedirectMenu(baseloaction+'/admin/manage/subject/toSubjectList')">
                                                    <i class="fa fa-plus"></i> 新建专业
                                                </a>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i>  授课讲师</label>
                                            <div class="col-sm-8">
                                                <p>
                                                    <button class="btn btn-primary selectTeacher" data-type="0" type="button" th:style="!${#strings.isEmpty(courseOpen['id'])} and  ${courseOpen['id']} >0 ? 'display: none' : ''"><i class="fa fa-plus"></i> 选择授课讲师</button>
                                                </p>
                                                <div id="teacher-div" class="well m-t mt10 no-padding">
                                                    <ul class="list-group" id="teacherList">
                                                        <li class="list-group-item">
                                                            <input type="hidden" name="playType" value="TT">
                                                            <input id="teacher-Id" type="hidden" name="teacherId" th:value="${courseOpen['teacherId']}"/>
                                                            <span class="pull-right deleteTeacher" data-type="0" th:classappend="!${#strings.isEmpty(courseOpen['teacherId'])} and  ${courseOpen['teacherId']} >0 ?'hide':''">
                                                                <a href="javascript:void(0);" title="移除" class="c-999 fs14"><i id="teacher" class="fa fa-remove"></i></a>
                                                            </span>
                                                            <span class="fs14" id="teacher-Name" th:text="${#maps.isEmpty(courseOpen['teacher'])}?'请选择授课讲师':${courseOpen['teacher']['teacherName']}"></span>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right">助教</label>
                                            <div class="col-sm-8">
                                                <p>
                                                    <button class="btn btn-primary selectTeacher" data-type="1" type="button" th:style="!${#strings.isEmpty(courseOpen['id'])} and  ${courseOpen['id']} >0 ? 'display: none' : ''"><i class="fa fa-plus"></i> 选择助教</button>
                                                </p>
                                                <div id="tutorOne-div" class="well m-t mt10 no-padding">
                                                    <ul class="list-group" id="tutorFirst">
                                                        <li class="list-group-item">
                                                            <input id="tutorOne-Id" type="hidden" name="tutorOne" th:value="${courseOpen['tutorOne']}"/>
                                                            <span class="pull-right deleteTeacher" data-type="1" th:classappend="!${#strings.isEmpty(courseOpen['id'])} and  ${courseOpen['id']} > 0 ?'hide':''">
                                                                <a href="javascript:void(0);" title="移除" class="c-999 fs14">
                                                                    <i id="tutorOne" class="fa fa-remove"></i>
                                                                </a>
                                                            </span>
                                                            <span class="fs14" id="tutorOne-Name" th:text="${#maps.isEmpty(courseOpen['teacherOne'])}?'请选择助教讲师':${courseOpen['teacherOne']['teacherName']}">助教</span>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right"> 允许回放</label>
                                            <div class="col-sm-10">
                                                <div class="checkbox i-checks">
                                                    <label style="padding: 0">
                                                        <input type="checkbox" th:checked="${courseOpen['replay']}==2"
                                                               id="replay"> <i></i> 允许回放
                                                    </label>
                                                </div>
                                                <span class="help-block m-b-none c-999">  免费直播直播结束后是否允许回放。回放将在直播结束后一段时间后可用</span>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed back-code" th:classappend="${courseOpen['replay']}==2?'':'hide'"></div>
                                        <div class="form-group back-code" th:classappend="${courseOpen['replay']}==2?'':'hide'">
                                            <label class="col-sm-2 control-label text-right">直播回放</label>
                                            <div class="col-sm-3">
                                                <input class="form-control" readonly name="backCode" id="backCode" th:value="${courseOpen['backCode']}" placeholder="直播回放暂未生成，请稍后再试"/>
                                                <input name="playBackType" type="hidden" th:value="${courseOpen['playBackType']}"/>
                                                <span class="help-block m-b-none c-999">直播回放视频码，用于直播结束后的回放</span>
                                            </div>
                                            <p>
                                                <label class="col-sm-1 control-label "> 视频码</label>
                                                &nbsp; &nbsp;
                                                <button class="btn btn-primary " type="button" id="uploadVideo">
                                                    <i class="fa fa-plus"></i>&nbsp;上传视频
                                                </button>
                                                <button class="btn btn-primary " type="button" id="selectVideo">
                                                    <i class="fa fa-mouse-pointer"></i>&nbsp;选择视频
                                                </button>
                                            </p>
                                        </div>
                                        <input  name="roomId"  th:value="${courseOpen['roomId']}" type="hidden"/>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right "> <i class="c-red">*</i> 直播间名称</label>
                                            <div class="col-sm-8">
                                            <input class="form-control" id="liveName" name="liveName"  th:value="${courseOpen['liveName']}" type="text"/>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right "> <i class="c-red">*</i> 公告</label>
                                            <div class="col-sm-8">
                                                <input class="form-control" id="liveNotice" name="liveNotice"  th:value="${courseOpen['liveNotice']}" type="text"/>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i>  授课时间</label>
                                            <div class="col-sm-10">
                                                <input placeholder="开始时间" class="laydate-icon form-control layer-date" id="openTime" name="openTime" th:value="${courseOpen['openTime']}"/>
                                                _
                                                <input placeholder="结束时间" class="laydate-icon form-control layer-date" id="endTime" name="endTime" th:value="${courseOpen['endTime']}"/>
                                                <span class="help-block m-b-none c-999">  授课时间(60小时之内)</span>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i>直播间类型</label>
                                            <div class="col-sm-8 radio i-checks">
                                                <label>
                                                    <input type="radio" value="1" name="liveType" th:checked="${courseOpen['liveType']} eq '1' or ${courseOpen['liveType']} == null"><i></i>标准大班
                                                    <input type="radio" value="0" name="liveType" th:checked="${courseOpen['liveType']} eq '0'"><i></i>超大班
                                                    <span class="help-block m-b-none c-999">标准大班支持1000人以内、超大班支持1000人以上。(最多支持两人互动)</span>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 免费直播管理封面</label>
                                            <div class="col-sm-8">
                                                <p>
                                                    <button class="btn btn-primary " id="courseOpenImageBtn" type="button"><i class="fa fa-image"></i>&nbsp;选择图片</button>
                                                </p>
                                                <div class="clearfix" id="coverImage">
                                                    <div class="file-box">
                                                        <div class="file">
                                                            <span class="corner" title="删除" id="remove-image"><i class="fa fa-remove"></i></span>
                                                            <div class="image">
                                                                <img alt="免费直播封面" id="course-open-image" class="img-responsive" th:src="!${#maps.isEmpty(courseOpen['imageMap'])} ? ${courseOpen['imageMap']['pcUrlMap']['large']} : @{{path}/admin/v3/img/default/default-pic.jpg?v={v}(path=${staticPath},v=${v})}"/>
                                                            </div>
                                                            <div class="file-name">
                                                                <p id="file-names" th:text="!${#maps.isEmpty(courseOpen['imageMap'])} and ${courseOpen['imageMap']['fileName']}!=null ? ${courseOpen['imageMap']['fileName']}:'文件名'"></p>
                                                                <small id="create-time" th:text="!${#maps.isEmpty(courseOpen['imageMap'])} and ${courseOpen['imageMap']['createTime']}!=null ? ${courseOpen['imageMap']['createTime']}:'上传时间'"></small>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label text-right "> 提前进入时间</label>
                                            <div class="col-sm-8">
                                                <input class="form-control data-num" maxlength="6" id="pre-enter-time" readonly name="preEnterTime" th:value="20" type="text">
                                                <span class="help-block m-b-none c-999">单位：分钟</span>
                                            </div>
                                        </div>
                                        <div class="hr-line-dashed"></div>
                                        <div class="form-group">
                                            <div class="col-sm-8 col-sm-offset-2">
                                                <button id="save-continue" class="btn btn-primary ml10 save-btn-box" type="button">保存，下一步</button>
                                                <button id="save-back" class="btn btn-danger save-btn-box" type="button">保存，返回</button>
                                                <button id="cancel" class="btn btn-white ml10" type="button">取消</button>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                    <div data-th-replace="common/importantNotes"></div>
                </div>
            </div>
        </div>
    </div>
    <div data-th-replace="layout/head-footer"></div>
    <script type="text/javascript" th:src="@{{path}/admin/libs/plugins/layer/laydate/laydate.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/upload/common-webuploader.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/manage/teacher/common-select-teacher-list.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/course/live/create-live.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script th:src="@{{path}/admin/business/course/cloud/select-common-video.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/course/open/save-courseOpen.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/common/qrcode/jquery.qrcode.min.js?v={v}(path=${staticPath}, v=${v})}"></script>
</body>
</html>
